﻿/*
SINACOR - BMF&Bovespa
Arquivo: IDistribuicaoNegocio.cs
Criado em: 20-jul-2010 18:25:40
Arquiteto Responsável: p-dmartinelli
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.ComponentModel;
using Sinacor.Infra.Common.Exceptions;
using Sinacor.Infra.Service.ExceptionHandling;
using Sinacor.Infra.Service.Security.Services;
using Sinacor.Infra.Common.Exceptions.FaultContracts;


namespace Sinacor.Servico.Bovespa.Alocacao.Service.ServiceContract 
{
	[ExceptionShielding]
	[ServiceContract(Namespace = "http://www.bovespa.com.br/Sinacor.Servico.Bovespa.Alocacao.Service.ServiceContract", SessionMode = SessionMode.Allowed)]
	public interface IDistribuicaoNegocio 
	{
		/// <summary>
		/// Pesquisa negocios distribuidos
		/// Transacional: Não
		/// </summary>
		/// <param name="request"></param>
		[FaultContract(typeof(BusinessFault))]
		[FaultContract(typeof(ValidationFault))]
		[FaultContract(typeof(GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ConsultarNegociosDistribuidos")]
		List<DataContract.Response.NegocioDistribuidoResponse> ConsultarNegociosDistribuidos(DataContract.Request.FiltroNegocioDistribuicaoRequest request);

		/// <summary>
		/// Pesquisa negocios casados e nao distribuidos
		/// Transacional: Não
		/// </summary>
		/// <param name="request"></param>
		[FaultContract(typeof(BusinessFault))]
		[FaultContract(typeof(ValidationFault))]
		[FaultContract(typeof(GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ConsultarNegociosNaoDistribuidos")]
		List<DataContract.Response.NegocioNaoDistribuidoResponse> ConsultarNegociosNaoDistribuidos(DataContract.Request.FiltroNegocioDistribuicaoRequest request);

		/// <summary>
		/// Distribui os negocios
		/// Transacional: Sim
		/// </summary>
		/// <param name="request"></param>
        [TransactionRequired]
		[FaultContract(typeof(BusinessFault))]
		[FaultContract(typeof(ValidationFault))]
		[FaultContract(typeof(GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "DistribuirNegocio")]
		List<DataContract.Response.DadosDistribuicaoResponse> DistribuirNegocio(DataContract.Request.NegociosDistribuidosRequest request);

		/// <summary>
		/// Valida todas as linhas digitadas
		/// Transacional: Não
		/// </summary>
		/// <param name="request"></param>
		[FaultContract(typeof(BusinessFault))]
		[FaultContract(typeof(ValidationFault))]
		[FaultContract(typeof(GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ValidarDistribuicao")]
		List<DataContract.Response.DadosDistribuicaoResponse> ValidarDistribuicao(DataContract.Request.NegociosDistribuidosRequest request);
        
        /// <summary>
        /// Valida uma linha digitada
        /// Transacional: Não
        /// </summary>
        /// <param name="request"></param>
        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ValidarDistribuicaoDigitadoAtual")]
        DataContract.Response.DadosDistribuicaoResponse ValidarDistribuicaoDigitadoAtual(DataContract.Request.NegociosDistribuidosRequest request);
    }

}